<script setup>
import { RouterView } from 'vue-router'
import { useUserStore } from '@/stores/user'
import { onMounted } from 'vue'
import AIAssistant from '@/components/AIAssistant/AIAssistant.vue'

// 获取用户存储实例
const userStore = useUserStore()

// 在应用初始化时加载用户信息
onMounted(() => {
  userStore.loadUserInfo()
})
</script>

<template>
  <div class="app-container">
    <RouterView />
    <AIAssistant />
  </div>
</template>

<style scoped>
.app-container {
  position: relative;
  width: 100%;
  height: 100%;
}
</style>
